<template>
	<view :style="colorStyle">
		<view class="order-details">
			<!-- 给header上与data上加on为退款订单-->
			<view class="header bg-color acea-row row-middle">
				<view class="left_icon flex_c">
					<view class="iconfont icon-duihao"></view>
				</view>
				<view class="right_info">
					<view class="title">
						<text
							v-if="orderInfo.exchanging_status!=1&&orderInfo.exchanging_status!=2">{{orderInfo.status_txt}}</text>
						<text v-else>{{orderInfo.user_status_txt}}</text>
					</view>
					<view class="sub_title">
						<text v-if="orderInfo._add_time">{{orderInfo._add_time||''}}</text>
					</view>
				</view>
			</view>
			<view class="refund-msg" v-if="[4, 5].includes(orderInfo.refund_type)">
				<view v-if="orderInfo._status.refund_name != ''">
					<view class="refund-msg-user">
						<text class="name">{{ orderInfo._status.refund_name }}</text>
						<text>{{ orderInfo._status.refund_phone }}</text>
						<!-- #ifndef H5 -->
						<text class="copy-refund-msg" @click="copyAddress()">{{ $t(`复制`) }}</text>
						<!-- #endif -->
						<!-- #ifdef H5 -->
						<text class="copy-refund-msg"
							:data-clipboard-text="orderInfo._status.refund_name + orderInfo._status.refund_phone + orderInfo._status.refund_address">
							{{ $t(`复制`) }}
						</text>
						<!-- #endif -->
					</view>
					<view class="refund-address">
						{{ orderInfo._status.refund_address }}
					</view>
					<view class="refund-tip">
						<text class="iconfont icon-zhuyi-copy"></text>
						{{ $t(`请按以上退货信息将商品退回`) }}
					</view>
				</view>
				<view v-else>
					<view class="refund-tip1">
						<text class="iconfont icon-zhuyi-copy"></text>
						{{ $t(`请联系管理员获取退货地址`) }}
					</view>
				</view>
			</view>
			<view class="line" v-if="[4, 5].includes(orderInfo.refund_type)">
				<image src="@/static/images/line.jpg"></image>
			</view>


			<view v-if="isGoodsReturn == false">
				<view v-if="orderInfo.virtual_type == 0">
					<view class="address" v-if="orderInfo.shipping_type === 1||orderInfo.shipping_type === 3">
						<view class="name">
							{{ orderInfo.real_name }}
							<text class="phone">{{ orderInfo.user_phone }}</text>
						</view>
						<view>{{ orderInfo.user_address }}</view>
					</view>
					<view v-else class="address acea-row row-between-wrapper">
						<view class="address-box">
							<view class="name" @tap="makePhone">
								{{ orderInfo.system_store.name }}
								<text class="phone">{{ orderInfo.system_store.phone }}</text>
							</view>
							<view>{{ orderInfo.system_store.detailed_address }}</view>
						</view>
						<view class="icon acea-row row-middle">
							<view class="iconfont icon-dianhua" @click.stop="makePhone"></view>
							<view class="iconfont icon-dingwei2" @click.stop="showMaoLocation(system_store)"></view>
						</view>
					</view>
					<view class="line" v-if="orderInfo.shipping_type === 1">
						<image src="@/static/images/line.jpg"></image>
					</view>
				</view>
				<view v-if="orderInfo.virtual_type != 0" style="paddingtop: 6px"></view>
			</view>
			<view v-else>
				<!-- 拒绝退款 -->
				<view class="refund" v-if="orderInfo.refund_type == 3">
					<view class="title">
						<!-- <image src="../static/shuoming.png" mode=""></image> -->
						{{ $t(`拒绝退款`) }}
					</view>
					<view class="con">{{ $t(`拒绝原因`) }}：{{ orderInfo.refuse_reason || '' }}</view>
				</view>
			</view>


			<!-- 商品信息 -->
			<view class="orderGoods">
				<view class="order_no" style="font-size: 26rpx;color: #2E2E2E;padding: 30rpx;">
					<text>订单号：</text>{{orderInfo.exchange_order||''}}
				</view>
				<view class='goodWrapper'>
					<view>
						<view class="item acea-row row-between-wrapper" style="padding: 10rpx 0;height: auto;">
							<view class='pictrue'>
								<image :src='orderInfo.image'></image>
							</view>
							<view class='text'>
								<view class='acea-row row-between-wrapper' style="align-items: flex-start;">
									<view class='name line2' style="width:unset">{{orderInfo.store_name}}</view>

								</view>

								<view class='attr line1 flex_s' style="margin-top: 30rpx;">
									<view class="price_item flex_s" v-if="orderInfo.cart_info[0].productInfo.metal_type!=4">
										克重:<text>{{orderInfo.cart_info[0].attrInfo.weight||0}}克</text>
									</view>
									<view class="price_item flex_s" v-if="orderInfo.cart_info[0].productInfo.metal_type==4">
										<text>￥{{orderInfo.price||0}}</text>
									</view>
									<!-- <view class="price_item" v-if="pageType=='order'">
										<view>工费:<text>{{item.productInfo.attrInfo.labor_charges}}/g</text></view>
									</view> -->
								</view>



							</view>
						</view>



					</view>

				</view>
			</view>
			<!-- 收货地址 -->
			<view style="font-size: 28rpx;color: #4D4D4D;padding:20rpx 30rpx 0;">
				换货地址
			</view>
			<view class="wrapper">
				<view class="info_box" v-if="addressData.user_address">
					<view class="top_box flex_sb">
						<view class="left">
							<text class="name">{{addressData.real_name||''}}</text>
							<text class="phone">{{addressData.user_phone||''}}</text>
						</view>
						<view class="right">
							<text class="iconfont icon-fuzhi"
								@click="copyHandle(addressInfo)"></text>
						</view>
					</view>
					<view class="address_box">
						{{addressData.user_address||''}}
					</view>
				</view>
				<view class="info_box" v-else>
					<text>暂无换货地址</text>
				</view>

			</view>
			<!-- 发货单号 -->
			<template v-if="orderInfo.user_status_txt==='已发货'">
				<view style="font-size: 28rpx;color: #4D4D4D;padding:20rpx 30rpx 0;">
					发货单号
				</view>
				<view class="wrapper">
					<view class="info_box">
						<view class="top_box flex_sb">
							<text class="name">{{orderInfo.exchange_express_name||''}}</text>
							<text class="iconfont icon-fuzhi"
								@click="copyHandle(orderInfo.exchange_express_name)"></text>
						</view>
						<view class="address_box">
							<text>{{orderInfo.exchange_express||''}}</text>
						</view>
					</view>

				</view>
			</template>
			<!-- 换货原因 -->
			<view class="wrapper">
				<view class="item acea-row row-between">
					<view>{{ $t(`换货数量`) }}：</view>
					<view class="conter">{{ orderInfo.exchange_num }}</view>
				</view>
				<view class="item acea-row row-between">
					<view>{{ $t(`换货原因`) }}：</view>
					<view class="conter">{{ orderInfo.exchange_explain }}</view>
				</view>
				<view class="item acea-row row-between">
					<view>{{ $t(`用户备注`) }}：</view>
					<view class="conter">{{ orderInfo.remark }}</view>
				</view>
				<view class="item" v-if="orderInfo.exchange_img">
					<view>{{ $t(`申请图片`) }}：</view>
					<view class="upload">
						<view class="conter" style="justify-content: flex-start;">
							<view class="pictrue">
								<image :src="orderInfo.exchange_img"></image>
							</view>
						</view>
					</view>
				</view>
			</view>
			<!-- 驳回原因 -->
			<view class="wrapper" v-if="orderInfo.exchange_status==2&&orderInfo.refuse_reason">
				<view class="item acea-row row-between">
					<view>{{ $t(`驳回原因`) }}：</view>
					<view class="conter">{{ orderInfo.refuse_reason }}</view>
				</view>
			</view>

			<view class="wrapper" v-if="customForm && customForm.length">
				<view class="item acea-row row-between" v-for="(item, index) in customForm" :key="index">
					<view class="upload" v-if="item.label == 'img'">
						<view class="diy-from-title">{{ item.title }}：</view>
						<view class="pictrue" v-for="(img, index) in item.value" :key="index">
							<image :src="img"></image>
						</view>
					</view>
					<view v-if="item.label !== 'img'" class="diy-from-title">{{ item.title }}：</view>
					<view v-if="item.label !== 'img'" class="conter">{{ item.value }}</view>
				</view>
				<view class="copy-text" @click="copyText()">{{ $t(`复制`) }}</view>
			</view>




			<view style="height: 120rpx"></view>
			<view class="footer" v-if="orderInfo.exchanging_status==1&&orderInfo.user_status_txt==='待用户发货'">
				<view class="right-btn">
					<view class="bnt bg-color refundBnt" @tap="refund_close=true">
						{{ $t(`填写单号`) }}
					</view>
				</view>
			</view>
		</view>
		<home v-show="!aleartStatus && !invShow"></home>
		<view class="mask" v-if="refund_close" @click="refund_close = false"></view>
		<view class="refund-input" :class="refund_close ? 'on' : ''">
			<view class="input-msg">
				<text class='iconfont icon-guanbi5' @tap='refund_close = false'></text>
				<view class="refund-input-title">填写物流单号
				</view>
				<view class="refund-input-sty">
					<input type="text" v-model="inputData.exchange_express_name" placeholder="请输入快递公司" />
				</view>
				<view class="refund-input-sty">
					<input type="text" v-model="inputData.exchange_express" placeholder="请输入物流单号" />
				</view>

				<view class="refund-bth">
					<view class="submit-refund" @click="refundSubmit">提交</view>
				</view>
			</view>
		</view>
		<!-- #ifdef MP -->
		<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
		<!-- #endif -->
		<view class="mask invoice-mask" v-if="aleartStatus" @click="aleartStatus = false"></view>
		<view class="mask more-mask" v-if="moreBtn" @click="moreBtn = false"></view>
		<invoice-picker :inv-show="invShow" :is-special="special_invoice" :url-query="urlQuery"
			:inv-checked="invChecked" :order-id="order_id" :inv-list="invList" :is-order="1" @inv-close="invClose"
			@inv-change="invSub" @inv-cancel="invCancel"></invoice-picker>

		<modal ref="modal" content="余额不足，可前往充值，使用余额会更优惠哦" confirmText="去充值" @confirm="goPage"></modal>
	</view>
</template>

<script>
	import modal from "@/components/modal/modal.vue";
	import {
		getOrderDetail,
		refundOrderDetail,
		orderAgain,
		orderTake,
		orderDel,
		refundOrderDel,
		orderCancel,
		refundExpress,
		cancelRefundOrder
	} from '@/api/order.js';
	import {
		openOrderRefundSubscribe
	} from '@/utils/SubscribeMessage.js';
	import {
		getCustomerType
	} from '@/api/api.js';
	import {
		getCustomer
	} from '@/utils/index.js';
	import {
		getUserInfo,
		invoiceList,
		makeUpinvoice
	} from '@/api/user.js';
	import {
		exchange_detail,
		apply_express
	} from '@/api/new_api.js';
	import home from '@/components/home';
	import orderGoods from '@/components/orderGoods';
	import ClipboardJS from '@/plugin/clipboard/clipboard.js';
	import {
		toLogin
	} from '@/libs/login.js';
	import {
		mapGetters
	} from 'vuex';
	// #ifdef MP
	import authorize from '@/components/Authorize';
	// #endif
	import colors from '@/mixins/color';
	import zbCode from '@/components/zb-code/zb-code.vue';
	import {
		HTTP_REQUEST_URL
	} from '@/config/app.js';
	import {
		pay //尾款支付
	} from '@/api/new_api.js';
	import {
		debounceImmediate
	} from "@/utils/validate";
	export default {
		components: {
			home,
			orderGoods,
			zbCode,
			modal,
			// #ifdef MP
			authorize
			// #endif
		},
		mixins: [colors],
		data() {
			return {
				customForm: '', //自定义留言
				//二维码参数
				codeShow: false,
				cid: '1',
				ifShow: true,
				val: '', // 要生成的二维码值
				size: 200, // 二维码大小
				unit: 'upx', // 单位
				background: '#FFF', // 背景色
				foreground: '#000', // 前景色
				pdground: '#000', // 角标色
				icon: '', // 二维码图标
				iconsize: 40, // 二维码图标大小
				lv: 3, // 二维码容错级别 ， 一般不用设置，默认就行
				onval: true, // val值变化时自动重新生成二维码
				loadMake: true, // 组件加载完成后自动生成二维码
				src: '', // 二维码生成后的图片地址或base64
				codeSrc: '',
				wd: 0,
				hg: 0,
				mpUrl: '',

				order_id: '',
				evaluate: 0,
				cartInfo: [], //购物车产品
				pid: 0, //上级订单ID
				split: [], //分单商品
				orderInfo: {
					help_info: {},
					system_store: {},
					_status: {}
				}, //订单详情
				system_store: {},
				isGoodsReturn: false, //是否为退款订单
				status: {}, //订单底部按钮状态
				refund_close: false,
				isClose: false,
				payMode: [{
						name: this.$t(`微信支付`),
						icon: 'icon-weixinzhifu',
						value: 'weixin',
						title: this.$t(`使用微信快捷支付`),
						payStatus: true
					},
					// #ifdef H5 || APP-PLUS
					{
						name: this.$t(`支付宝支付`),
						icon: 'icon-zhifubao',
						value: 'alipay',
						title: this.$t(`使用支付宝支付`),
						payStatus: true
					},
					// #endif
					{
						name: this.$t(`余额支付`),
						icon: 'icon-yuezhifu',
						value: 'yue',
						title: this.$t(`可用余额`),
						number: 0,
						payStatus: true
					},
					{
						name: this.$t(`好友代付`),
						icon: 'icon-haoyoudaizhifu',
						value: 'friend',
						title: this.$t(`找微信好友支付`),
						payStatus: 1
					},
					{
						name: this.$t(`通联支付`),
						icon: 'icon-tonglianzhifu1',
						value: 'allinpay',
						title: this.$t(`使用通联支付付款`),
						payStatus: 1
					}
				],
				pay_close: false,
				pay_order_id: '',
				totalPrice: '0',
				isAuto: false, //没有授权的不会自动授权
				isShowAuth: false, //是否隐藏授权
				routineContact: 0,
				express_num: '',
				invoice_func: false,
				invoiceData: {},
				invoice_id: 0,
				invChecked: '',
				moreBtn: false,
				invShow: false,
				aleartStatus: false, //发票弹窗
				special_invoice: false,
				invList: [],
				customerInfo: {},
				userInfo: {},
				isReturen: '',
				urlQuery: '',
				payType: 2,
				returnId: '',
				cart_id: '',
				addressData: {},
				inputData: {
					exchange_express: '', //快递单号
					exchange_express_name: '' //快递公司名称
				},
				addressInfo:''
			};
		},
		computed: mapGetters(['isLogin']),
		onLoad: function(options) {
			if (options.order_id) {
				this.$set(this, 'order_id', options.order_id);
				this.isReturen = options.isReturen;
			}
			if (options.id) {
				this.$set(this, 'returnId', options.id);
				this.$set(this, 'cart_id', options.cart_id);
				this.isReturen = options.isReturen;
			}
			// if (options.invoice_id) {
			// 	this.invoice_id = options.invoice_id;
			// }
		},
		onShow() {
			if (this.isLogin) {

				this.exchange_detail()
				// this.getOrderInfo();
				// this.getUserInfo();
				// this.getCustomerType();

			} else {
				toLogin();
			}
		},
		onHide: function() {
			this.isClose = true;
		},
		onReady: function() {
			// #ifdef H5
			this.$nextTick(function() {
				const clipboard = new ClipboardJS('.copy-data');
				clipboard.on('success', () => {
					this.$util.Tips({
						title: this.$t(`复制成功`)
					});
				});
				const address = new ClipboardJS('.copy-refund-msg');
				address.on('success', () => {
					this.$util.Tips({
						title: this.$t(`复制成功`)
					});
				});
			});

			// #endif
		},
		methods: {
			copyHandle(val) {
				uni.setClipboardData({
					data: val,
					success() {
						uni.Tips({
							title: this.$t(`复制成功`),
							icon: 'success'
						});
					}
				});
			},
			refundSubmit: debounceImmediate(function() {
				if (!this.inputData.exchange_express_name) return this.$util.Tips({
					title: '请输入快递公司'
				})
				if (!this.inputData.exchange_express) return this.$util.Tips({
					title: '请输入快递单号'
				})
				let params = {
					id: this.returnId,
					cart_id: this.cart_id,
					...this.inputData
				}
				apply_express(params).then((res) => {
					this.refund_close = false
					this.exchange_detail()
				})
			}, 1000),
			exchange_detail() {
				exchange_detail({
					id: this.returnId,
					cart_id: this.cart_id,
				}).then((res) => {
					let that = this
					const data = res.data
					that.$set(that, 'orderInfo', data['0']);
					that.$set(that, 'cartInfo', data['0'].cartInfo);
					that.$set(that, 'addressData', data.address);
					this.addressInfo=that.addressData.real_name+'\n'+that.addressData.user_phone+'\n'+that.addressData.user_address
				})
			},
			goPage() {
				this.$refs.modal.close()
				uni.navigateTo({
					url: '/pages/new_page/user/recharge'
				})
			},
			waitPayHandle(payType) {
				let that = this
				// payType:1在线支付，2余额支付
				console.log('支付尾款', payType);
				const params = {
					paytype: payType == 1 ? 'weixin' : 'yue',
					uni: this.orderInfo.order_id,
					type: 0
				}
				pay(params).then((res) => {
					let status = res.data.status,
						jsConfig = res.data.result.jsConfig;
					switch (status) {
						case 'SUCCESS':
							that.$util.Tips({
								title: res.msg,
								icon: 'success',
								success: function() {
									that.getOrderInfo();;
								}
							});

							break;
						case 'WECHAT_PAY':
							// #ifdef MP
							/* that.toPay = true; */
							let mp_pay_name = ''
							if (uni.requestOrderPayment) {
								mp_pay_name = 'requestOrderPayment'
							} else {
								mp_pay_name = 'requestPayment'
							}
							uni[mp_pay_name]({
								timeStamp: jsConfig.timestamp,
								nonceStr: jsConfig.nonceStr,
								package: jsConfig.package,
								signType: jsConfig.signType,
								paySign: jsConfig.paySign,
								success: function(res) {
									that.getOrderInfo()
								},
								fail: function(e) {
									uni.hideLoading();
									return that.$util.Tips({
										title: that.$t(`取消支付`)
									});
								},
								complete: function(e) {},
							})
							// #endif
							// #ifdef H5
							this.$wechat.pay(res.data.result.jsConfig).then(res => {
								return that.$util.Tips({
									title: that.$t(`支付成功`),
									icon: 'success'
								}, {
									tab: 5,
									url: goPages
								});
							}).catch(res => {
								if (!this.$wechat.isWeixin()) {
									uni.redirectTo({
										url: goPages + '&msg=' + that.$t(`支付失败`) +
											'&status=2'
										// '&msg=支付失败&status=2'
									})
								}
								if (res.errMsg == 'chooseWXPay:cancel') return that.$util.Tips({
									title: that.$t(`取消支付`)
								}, {
									tab: 5,
									url: goPages + '&status=2'
								});
							})
							// #endif

							break;

					}
				}).catch((err) => {
					if (err.status == 801) {
						this.$refs.modal.open() //弹窗提醒送货上门需满足多少克
					}
				})

			},
			openModal(data) {
				this.waitInfo = data
				this.$refs.payModalRef.open()
			},
			qrR(res) {
				this.codeSrc = res;
			},
			cancelRefundOrder(orderId) {
				let that = this;
				uni.showModal({
					title: that.$t(`取消申请`),
					content: that.$t(`您确认放弃此次申请吗`),
					success: (res) => {
						if (res.confirm) {
							cancelRefundOrder(that.order_id)
								.then((res) => {
									return that.$util.Tips({
										title: that.$t(`操作成功`),
										icon: 'success'
									}, {
										tab: 4,
										url: '/pages/users/user_return_list/index'
									});
								})
								.catch((err) => {
									return that.$util.Tips({
										title: err
									});
								});
						}
					}
				});
			},
			refundInput() {
				uni.navigateTo({
					url: `/pages/goods/order_refund_goods/index?orderId=` + this.order_id
				});
			},
			getCustomerType() {
				getCustomerType()
					.then((res) => {
						this.customerInfo = res.data;
					})
					.catch((err) => {
						this.$util.Tips({
							title: err
						});
					});
			},
			goGoodCall() {
				getCustomer(`/pages/extension/customer_list/chat?orderId=${this.order_id}&isReturen=${this.isReturen}`);
			},
			openSubcribe(e) {
				let page = e;
				// #ifndef MP
				uni.navigateTo({
					url: page
				});
				// #endif
				// #ifdef MP
				uni.showLoading({
					title: this.$t(`正在加载中`)
				});
				uni.navigateTo({
					url: page
				});
				return
				openOrderRefundSubscribe()
					.then((res) => {
						uni.hideLoading();
						uni.navigateTo({
							url: page
						});
					})
					.catch((err) => {
						uni.hideLoading();
					});
				// #endif
			},
			goReturnGoods() {},
			/**
			 * 拨打电话
			 */
			makePhone: function() {
				uni.makePhoneCall({
					phoneNumber: this.system_store.phone
				});
			},
			/**
			 * 打开地图
			 *
			 */
			showMaoLocation: function() {
				if (!this.system_store.latitude || !this.system_store.longitude)
					return this.$util.Tips({
						title: this.$t(`缺少经纬度信息无法查看地图`)
					});
				uni.openLocation({
					latitude: parseFloat(this.system_store.latitude),
					longitude: parseFloat(this.system_store.longitude),
					scale: 8,
					name: this.system_store.name,
					address: this.system_store.address + this.system_store.detailed_address,
					success: function() {}
				});
			},
			/**
			 * 打开支付组件
			 *
			 */
			pay_open: function() {
				this.openPop()
				return
				uni.navigateTo({
					url: `/pages/goods/cashier/index?order_id=${this.orderInfo.order_id}&from_type=order`
				});
				// this.pay_close = true;
				// this.pay_order_id = this.orderInfo.order_id;
				// this.totalPrice = this.orderInfo.pay_price;
			},
			/**
			 * 支付失败回调
			 *
			 */
			pay_fail: function() {
				this.pay_close = false;
				this.pay_order_id = '';
			},
			/**
			 * 登录授权回调
			 *
			 */
			onLoadFun: function() {
				this.getOrderInfo();
				this.getUserInfo();
			},
			/**
			 * 获取用户信息
			 *
			 */
			getUserInfo: function() {
				let that = this;
				getUserInfo().then((res) => {
					that.userInfo = res.data;
					// #ifdef H5
					that.payMode[2].number = res.data.now_money;
					// #endif
					// #ifdef APP-PLUS
					that.payMode[2].number = res.data.now_money;
					// #endif
					// #ifdef MP
					that.payMode[1].number = res.data.now_money;
					// #endif
					that.$set(that, 'payMode', that.payMode);
				});
			},
			/**
			 * 获取订单详细信息
			 *
			 */
			getOrderInfo: function() {
				let that = this;
				uni.showLoading({
					title: this.$t(`正在加载中`)
				});
				let obj = '';
				if (that.isReturen) {
					obj = refundOrderDetail(this.order_id);
				} else {
					obj = getOrderDetail(this.order_id);
				}
				obj
					.then((res) => {
						if (res.data.pid && res.data.pid == -1) {
							that.$util.Tips({
									title: this.$t(`订单信息不存在`)
								},
								'/pages/goods/order_list/index'
							);
						}
						let _type = res.data._status._type;
						uni.hideLoading();
						that.$set(that, 'orderInfo', res.data);
						//处理自定义留言非必填项的数据展示
						let arr = [];
						that.orderInfo.custom_form.map((i) => {
							if (i.value != '') {
								arr.push(i);
							}
						});
						that.$set(that, 'customForm', arr);
						that.$set(that, 'cartInfo', res.data.cartInfo);
						that.$set(that, 'pid', res.data.pid);
						that.$set(that, 'split', res.data.split);
						that.$set(that, 'evaluate', _type == 3 ? 3 : 0);
						that.$set(that, 'system_store', res.data.system_store);
						that.$set(that, 'invoiceData', res.data.invoice);
						if (that.invoiceData) {
							that.invoiceData.pay_price = res.data.pay_price;
						}
						that.$set(that, 'invoice_func', res.data.invoice_func);
						that.$set(that, 'special_invoice', res.data.special_invoice);
						that.$set(that, 'routineContact', Number(res.data.routine_contact_type));
						// #ifdef H5 || APP-PLUS
						this.$nextTick(() => {
							that.val = HTTP_REQUEST_URL +
								'/pages/admin/order_cancellation/index?verify_code=' + that.orderInfo
								.verify_code;
						});
						// #endif
						// #ifdef MP
						if (!that.orderInfo.code) {
							this.$nextTick(() => {
								that.val = HTTP_REQUEST_URL +
									'/pages/admin/order_cancellation/index?verify_code=' + that.orderInfo
									.verify_code;
							});
						} else {
							this.codeSrc = that.orderInfo.code || '';
						}
						// #endif
						if (this.orderInfo.refund_status != 0) {
							this.isGoodsReturn = true;
						} else {
							this.isReturen = 0;
						}
						if (that.invoice_id && !that.invoiceData) {
							that.invChecked = that.invoice_id || '';
							this.invoiceApply();
						}
						that.payMode.map((item) => {
							if (item.value == 'weixin') {
								item.payStatus = res.data.pay_weixin_open ? true : false;
							}
							if (item.value == 'alipay') {
								item.payStatus = res.data.ali_pay_status ? true : false;
							}
							if (item.value == 'yue') {
								item.payStatus = res.data.yue_pay_status == 1 ? true : false;
							}
							if (item.value == 'friend') {
								item.payStatus = res.data.friend_pay_status == 1 ? true : false;
							}
							if (item.value == 'allinpay') {
								item.payStatus = res.data.pay_allin_open == 1 ? true : false;
							}
						});

						that.getOrderStatus();
					})
					.catch((err) => {
						console.log(err, 'err');
						uni.hideLoading();
						that.$util.Tips({
								title: err
							},
							'/pages/goods/order_list/index'
						);
					});
			},
			// 不开发票
			invCancel() {
				this.invChecked = '';
				this.invTitle = this.$t(`不开发票`);
				this.invShow = false;
			},
			// 选择发票
			invSub(id) {
				this.invChecked = id;
				let data = {
					order_id: this.order_id,
					invoice_id: this.invChecked
				};
				makeUpinvoice(data)
					.then((res) => {
						uni.showToast({
							title: this.$t(`申请成功`),
							icon: 'success'
						});
						this.invShow = false;
						this.aleartStatus = true;
						this.getOrderInfo();
					})
					.catch((err) => {
						uni.showToast({
							title: err,
							icon: 'none'
						});
					});
			},
			// 关闭发票
			invClose() {
				this.invShow = false;
				this.getInvoiceList();
			},
			//申请开票
			invoiceApply() {
				this.urlQuery = `&specialInvoice=${this.userInfo.special_invoice}`;
				this.getInvoiceList();
				this.moreBtn = false;
				this.invShow = true;
			},
			aleartStatusChange() {
				this.moreBtn = false;
				this.aleartStatus = true;
			},
			getInvoiceList() {
				uni.showLoading({
					title: this.$t(`正在加载中`)
				});
				invoiceList()
					.then((res) => {
						uni.hideLoading();
						this.invList = res.data.map((item) => {
							item.id = item.id.toString();
							return item;
						});
						const result = this.invList.find((item) => item.id == this.invChecked);
						if (result) {
							let name = '';
							name += result.header_type === 1 ? this.$t(`个人`) : this.$t(`企业`);
							name += result.type === 1 ? this.$t(`普通`) : this.$t(`专用`);
							name += this.$t(`发票`);
							this.invTitle = name;
						}
					})
					.catch((err) => {
						uni.showToast({
							title: err,
							icon: 'none'
						});
					});
			},
			more() {
				this.moreBtn = !this.moreBtn;
			},
			/**
			 *
			 * 剪切订单号
			 */
			// #ifndef H5
			copy: function(text) {
				let that = this;
				uni.setClipboardData({
					data: text
				});
			},
			// #endif
			// #ifndef H5
			copyAddress() {
				uni.setClipboardData({
					data: this.orderInfo._status.refund_name + this.orderInfo._status.refund_phone + this.orderInfo
						._status.refund_address,
					success() {
						uni.Tips({
							title: this.$t(`复制成功`),
							icon: 'success'
						});
					}
				});
			},
			// #endif
			copyText(text) {
				let str = '';
				this.customForm.map((e) => {
					if (e.label !== 'img') {
						str += e.title + e.value;
					}
				});
				uni.setClipboardData({
					data: str
				});
			},
			// #ifdef H5
			copyAddress() {
				// console.log('1111111111111')
				// let msg =
				// console.log(msg)
				// return msg
			},
			// #endif
			/**
			 * 打电话
			 */
			goTel: function() {
				uni.makePhoneCall({
					phoneNumber: this.orderInfo.delivery_id
				});
			},
			/**
			 * 设置底部按钮
			 *
			 */
			getOrderStatus: function() {
				let orderInfo = this.orderInfo || {},
					_status = orderInfo._status || {
						_type: 0
					},
					status = {};
				let type = parseInt(_status._type),
					delivery_type = orderInfo.delivery_type,
					seckill_id = orderInfo.seckill_id ? parseInt(orderInfo.seckill_id) : 0,
					bargain_id = orderInfo.bargain_id ? parseInt(orderInfo.bargain_id) : 0,
					discount_id = orderInfo.discount_id ? parseInt(orderInfo.discount_id) : 0,
					combination_id = orderInfo.combination_id ? parseInt(orderInfo.combination_id) : 0;
				status = {
					type: type == 9 ? -9 : type,
					class_status: 0
				};
				if (type == 1 && combination_id > 0) status.class_status = 1; //查看拼团
				if (type == 2 && delivery_type == 'express') status.class_status = 2; //查看物流
				if (type == 2) status.class_status = 3; //确认收货
				if (type == 4 || type == 0) status.class_status = 4; //删除订单
				if (!seckill_id && !bargain_id && !combination_id && !discount_id && !orderInfo.type && (type == 3 ||
						type == 4)) status.class_status = 5; //再次购买
				this.$set(this, 'status', status);
			},
			/**
			 * 去拼团详情
			 *
			 */
			goJoinPink: function() {
				uni.navigateTo({
					url: '/pages/activity/goods_combination_status/index?id=' + this.orderInfo.pink_id
				});
			},
			/**
			 * 再此购买
			 *
			 */
			goOrderConfirm: function() {
				let that = this;
				orderAgain(that.orderInfo.order_id)
					.then((res) => {
						return uni.navigateTo({
							url: '/pages/goods/order_confirm/index?new=1&cartId=' + res.data.cateId
						});
					})
					.catch((err) => {
						return that.$util.Tips({
							title: err
						});
					});
			},
			confirmOrder(orderId) {
				let that = this;
				// #ifdef MP
				if (wx.openBusinessView && this.orderInfo.order_shipping_open && this.orderInfo.trade_no) {
					uni.showLoading({
						title: this.$t(`加载中`)
					});
					wx.openBusinessView({
						businessType: 'weappOrderConfirm',
						extraData: {
							transaction_id: this.orderInfo.trade_no
						},
						success() {},
						fail(err) {
							uni.hideLoading();
							return that.$util.Tips({
								title: err.errMsg
							});
						},
						complete() {
							uni.hideLoading();
						}
					});
				} else {
					this.defaultTake(orderId);
				}
				// #endif
				// #ifndef MP
				this.defaultTake(orderId);
				// #endif
			},
			defaultTake(orderId) {
				let that = this;
				uni.showModal({
					title: that.$t(`确认收货`),
					content: that.$t(`为保障权益，请收到货确认无误后，再确认收货`),
					success: (res) => {
						if (res.confirm) {
							console.log('1');
							orderTake(orderId ? orderId : that.order_id)
								.then((res) => {
									return that.$util.Tips({
											title: that.$t(`操作成功`),
											icon: 'success'
										},
										function() {
											that.getOrderInfo();
										}
									);
								})
								.catch((err) => {
									return that.$util.Tips({
										title: err
									});
								});
						}
					}
				});
			},
			/**
			 *
			 * 删除订单
			 */
			delOrder() {
				let that = this;
				uni.showModal({
					title: this.$t(`删除订单`),
					content: this.$t(`确定删除该订单`),
					success: (res) => {
						if (res.confirm) {
							(that.isReturen ? refundOrderDel : orderDel)(that.order_id)
							.then((res) => {
									if (that.status.type == -2) {
										return that.$util.Tips({
											title: that.$t(`删除成功`),
											icon: 'success'
										}, {
											tab: 5,
											url: '/pages/users/user_return_list/index'
										});
									} else {
										return that.$util.Tips({
											title: that.$t(`删除成功`),
											icon: 'success'
										}, {
											tab: 5,
											url: '/pages/goods/order_list/index'
										});
									}
								})
								.catch((err) => {
									return that.$util.Tips({
										title: err
									});
								});
						} else if (res.cancel) {
							return that.$util.Tips({
								title: that.$t(`已取消`)
							});
						}
					}
				});
			},
			cancelOrder() {
				let self = this;
				uni.showModal({
					title: this.$t(`提示`),
					content: this.$t(`确认取消该订单`),
					success: function(res) {
						if (res.confirm) {
							orderCancel(self.orderInfo.order_id)
								.then((data) => {
									// #ifndef MP
									self.$util.Tips({
										title: data.msg
									}, {
										tab: 3
									});
									// #endif
									// #ifdef MP
									self.$util.Tips({
											title: data.msg
										},
										'/pages/goods/order_list/index'
									);
									// #endif
								})
								.catch(() => {
									self.getOrderInfo();
								});
						} else if (res.cancel) {}
					}
				});
			}
		}
	};
</script>
<style scoped lang="scss">
	.btm_box {
		padding: 0 30rpx;

		.count_num {
			font-size: 28rpx;
			color: #2B2B32
		}
	}

	.cart_box {
		height: 54rpx;

		.stock {
			font-size: 20rpx;
			line-height: 54rpx;
			color: #aaa;
		}

		.line {
			padding: 0 6rpx;
		}

		.iconfont {
			font-size: 25rpx;
		}

		view {
			// border: 1px solid #a4a4a4;
			width: 56rpx;
			text-align: center;
			height: 100%;
			line-height: 54rpx;
			color: #282828;
			font-size: 45rpx;
		}

		.mysicle {
			border-radius: 50% !important;
			border: 2rpx solid var(--view-theme);
			overflow: hidden;

			.iconfont {
				color: var(--view-theme);
			}

		}

		.reduce {
			border-radius: 6rpx 0 0 6rpx;
			line-height: 48rpx;
			font-size: 60rpx;

		}

		.reduce.on {
			// border-color: #e3e3e3;
			border: 2rpx solid #e3e3e3;
			color: #DEDEDE !important;

			.iconfont {
				color: #DEDEDE !important;
			}
		}

		.plus {
			border-radius: 0 6rpx 6rpx 0;
			line-height: 46rpx;
		}

		.plus.on {
			// border-color: #e3e3e3;
			border: 2rpx solid #e3e3e3;
			color: #dedede !important;

			.iconfont {
				color: #DEDEDE !important;
			}
		}

		.num {
			background: rgba(242, 242, 242, 1);
			color: #282828;
			font-size: 28rpx;
			margin: 0 10rpx;
		}
	}

	.gold_price {
		border-radius: 8rpx;
		padding: 0 27rpx;
		color: #383838;
		font-size: 26rpx;
		height: 38rpx;
		background: linear-gradient(90deg, #F2E2AE 0%, #F9F4E5 47.92%, #EDDEB1 100%);
	}

	.price_item {
		font-size: 26rpx;
		color: #737272;
		margin-right: 10rpx;

		text {
			color: #E63523;
		}

		.num {
			color: #171616;
			font-size: 28rpx;
			margin-left: 17rpx;
		}

	}

	.fontcolor {
		color: #e93323;
	}

	.orderGoods {
		background-color: #fff;
	}

	.orderGoods .total {
		display: flex;
		justify-content: space-between;
		align-items: center;
		width: 100%;
		// height: 86rpx;
		padding: 0 30rpx;
		border-bottom: 2rpx solid #f0f0f0;
		font-size: 30rpx;
		color: #282828;
		line-height: 86rpx;
		box-sizing: border-box;


	}

	.botton-btn {
		display: flex;
		align-items: right;
		justify-content: flex-end;
		padding: 0rpx 20rpx 20rpx 20rpx;
	}

	.rig-btn {
		display: flex;
		align-items: center;

		.refund {
			font-size: 26rpx;
			color: #e93323;
		}

		.done {
			font-size: 26rpx;
			color: #F19D2F;
		}
	}

	.logistics {
		// height: 46rpx;
		line-height: 30rpx;
		color: #666666;
		font-size: 20rpx;
		border: 1px solid #CCCCCC;
		border-radius: 30rpx;
		padding: 8rpx 22rpx;
		margin-left: 10rpx;
	}

	.sure {
		color: #e93323;
		border: 1px solid #e93323;
	}

	.more-operation {
		display: flex;
		justify-content: center;
		align-items: center;
		padding: 10rpx 0;
		color: #bbb;
	}

	.b-top {
		margin-left: 30rpx;
		margin-right: 30rpx;
		border-top: 1px solid #f0f0f0
	}

	.fade-enter-active,
	.fade-leave-active {
		transition: all 0.1s;
	}

	.fade-enter,
	.fade-leave-to

	/* .fade-leave-active below version 2.1.8 */
		{
		opacity: 0;
		transform: translateY(-10px);
	}

	.op {
		opacity: 0.5;

	}

	.gray {
		filter: grayscale(100%);
		filter: gray;
	}

	.pic {
		display: flex;
		justify-content: space-between;
	}

	.valid {
		margin-left: 20rpx;
		font-size: 26rpx;
	}

	.pay-price {
		color: #E93323;
	}

	.refund {
		text-align: right;
		font-size: 26rpx;
		color: var(--view-theme);
	}



	.pay_box {
		padding: 70rpx 40rpx;
		background: #F6F6F6;
		width: 750rpx;
		// height: 775rpx;
		border-radius: 30rpx 30rpx 0px 0px;

		.title {
			font-size: 28rpx;
			color: #000000;
			margin-bottom: 50rpx;
		}

		.btn {
			width: 690rpx;
			height: 94rpx;
			line-height: 94rpx;
			border-radius: 47rpx;
			background: var(--view-theme);
			text-align: center;
			font-size: 34rpx;
			color: #fff;
			margin: 150rpx auto 30rpx;
		}

		.body {

			.body_item {
				width: 680rpx;
				height: 146rpx;
				border-radius: 20rpx;
				margin-bottom: 19rpx;
				padding: 40rpx 30rpx;
				background: #fff;

				.left_info {
					.img_box {
						width: 77rpx;
						height: 77rpx;
						border-radius: 50%;
						overflow: hidden;
						margin-right: 18rpx;

						image {
							width: 100%;
							height: 100%;

						}
					}

					.text_box {
						.text1 {
							font-size: 28rpx;
							font-weight: 700;
							margin-bottom: 14rpx;
						}

						.text2 {
							font-size: 22rpx;
							color: #8C7137;
						}
					}
				}

				.right_info {
					width: 45rpx;
					height: 45rpx;
					border-radius: 50%;
					overflow: hidden;

					image {
						width: 100%;
						height: 100%;
					}
				}
			}
		}
	}

	.refund-tip {
		font-size: 26rpx;
		margin-top: 10rpx;
		color: var(--view-theme);

		.iconfont {
			font-size: 26rpx;
			margin-right: 6rpx;
		}
	}

	.refund-tip1 {
		font-size: 26rpx;
		color: var(--view-theme);

		.iconfont {
			font-size: 26rpx;
			margin-right: 6rpx;
		}
	}

	.qs-btn {
		width: auto;
		height: 60rpx;
		text-align: center;
		line-height: 60rpx;
		border-radius: 50rpx;
		font-size: 27rpx;
		white-space: nowrap;
		padding: 0 26rpx;
		color: #666;
		border: 1px solid #ccc;
		margin-right: 20rpx;
	}

	.refund-input {
		position: fixed;
		bottom: 0;
		left: 0;
		width: 100%;
		border-radius: 16rpx 16rpx 0 0;
		background-color: #fff;
		z-index: 99;
		padding: 40rpx 0 70rpx 0;
		transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
		transform: translate3d(0, 100%, 0);

		.refund-input-title {
			font-size: 32rpx;
			margin-bottom: 60rpx;
			color: #282828;
		}

		.refund-input-sty {
			border: 1px solid #ddd;
			padding: 20rpx 20rpx;
			border-radius: 40rpx;
			width: 100%;
			margin: 20rpx 65rpx;
		}

		.input-msg {
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			position: relative;
			margin: 0 65rpx;

			.iconfont {
				position: absolute;
				font-size: 32rpx;
				color: #282828;
				top: 8rpx;
				right: -30rpx;
			}
		}

		.refund-bth {
			display: flex;
			margin: 0 65rpx;
			margin-top: 20rpx;
			justify-content: space-around;
			width: 100%;

			.close-refund {
				padding: 24rpx 80rpx;
				border-radius: 80rpx;
				color: #fff;
				background-color: #ccc;
			}

			.submit-refund {
				width: 100%;
				padding: 24rpx 0rpx;
				text-align: center;
				border-radius: 80rpx;
				color: #fff;
				background-color: var(--view-theme);
			}
		}
	}

	.refund-input.on {
		transform: translate3d(0, 0, 0);
	}

	.goodCall {
		color: var(--view-theme);
		text-align: center;
		width: 100%;
		height: 86rpx;
		padding: 0 30rpx;
		border-top: 1rpx solid #eee;
		font-size: 30rpx;
		line-height: 86rpx;
		background: #fff;

		.icon-kefu {
			font-size: 36rpx;
			margin-right: 15rpx;
		}

		/* #ifdef MP */
		button {
			display: flex;
			align-items: center;
			justify-content: center;
			height: 86rpx;
			font-size: 30rpx;
			color: var(--view-theme);
		}

		/* #endif */
	}

	.order-details {
		padding-bottom: calc(15rpx + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
		padding-bottom: calc(15rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
	}

	.card_box {
		margin-bottom: 20rpx;
	}

	.order-details .header {
		padding: 40rpx 30rpx !important;
		// height: 150rpx;
		display: flex;
		align-items: flex-start;
		flex-wrap: nowrap;

		.left_icon {

			width: 40rpx;
			height: 40rpx;
			border-radius: 50%;
			border: 4rpx solid #383838;
			margin-right: 20rpx;
			margin-top: 10rpx;

			.iconfont {
				font-weight: 700;
				font-size: 25rpx;
			}
		}

		.border_white {
			border: 4rpx solid #FFF;
		}

		.white {
			color: #fff !important;

			.iconfont {
				color: #fff !important;
			}
		}

		.right_info {
			color: #383838;

			.title {

				font-size: 38rpx;
				margin-bottom: 12rpx;
			}

			.sub_title {
				font-size: 26rpx;
			}
		}
	}

	.order-details .header.on {
		background-color: #666 !important;
	}

	.order-details .header .pictrue {
		width: 110rpx;
		height: 110rpx;
	}

	.order-details .header .pictrue image {
		width: 100%;
		height: 100%;
	}

	.order-details .header .data {
		color: rgba(255, 255, 255, 0.8);
		font-size: 26rpx;
		margin-left: 27rpx;
	}

	.order-details .header .data.on {
		margin-left: 0;
	}

	.order-details .header .data .state {
		font-size: 30rpx;
		font-weight: bold;
		color: #fff;
		margin-bottom: 7rpx;
	}

	.order-details .header .data .time {
		margin-left: 20rpx;
	}

	.order-details .nav {
		background-color: #fff;
		font-size: 26rpx;
		color: #282828;
		padding: 25rpx 0;
	}

	.order-details .nav .navCon {
		padding: 0 40rpx;
	}

	.order-details .nav .on {
		color: var(--view-theme);
	}

	.order-details .nav .progress {
		padding: 0 65rpx;
		margin-top: 10rpx;
	}

	.order-details .nav .progress .line {
		width: 100rpx;
		height: 2rpx;
		background-color: #939390;
	}

	.order-details .nav .progress .iconfont {
		font-size: 25rpx;
		color: #939390;
		margin-top: -2rpx;
	}

	.order-details .address {
		font-size: 26rpx;
		color: #868686;
		background-color: #fff;
		padding: 35rpx 30rpx;
		margin-bottom: 12rpx;

		.icon {
			.iconfont {
				width: 44rpx;
				height: 44rpx;
				background: var(--view-minorColorT);
				font-size: 20rpx;
				border-radius: 50%;
				text-align: center;
				line-height: 44rpx;
				color: var(--view-theme);
				margin-left: 26rpx;
			}
		}
	}

	.order-details .address .name {
		font-size: 30rpx;
		color: #282828;
		margin-bottom: 15rpx;
	}

	.order-details .address .name .phone {
		margin-left: 40rpx;
	}

	.order-details .line {
		width: 100%;
		height: 3rpx;
	}

	.order-details .line image {
		width: 100%;
		height: 100%;
		display: block;
	}

	.order-details .wrapper {
		background-color: #fff;
		margin-top: 12rpx;
		padding: 30rpx;
	}

	.order-details .wrapper .acea-row {
		display: flex;
		flex-wrap: nowrap;
	}

	.order-details .wrapper .item {
		font-size: 28rpx;
		color: #282828;
	}

	.order-details .wrapper .item~.item {
		margin-top: 20rpx;
		white-space: normal;
		word-break: break-all;
		word-wrap: break-word;
	}

	.order-details .wrapper .item .conter {
		color: #868686;
		width: 480srpx;
		display: flex;
		flex-wrap: nowrap;
		justify-content: flex-end;
	}

	.order-details .wrapper .item .conter .copy {
		font-size: 20rpx;
		color: #333;
		border-radius: 3rpx;
		border: 1rpx solid #666;
		padding: 3rpx 15rpx;
		margin-left: 24rpx;
		white-space: nowrap;
	}

	.order-details .wrapper .actualPay {
		border-top: 1rpx solid #eee;
		margin-top: 30rpx;
		padding-top: 30rpx;
		display: flex;
		align-items: center;

		.pay-people {
			display: flex;
			align-items: center;

			image {
				width: 40rpx;
				height: 40rpx;
				border-radius: 50%;
			}

			.pay-nickname {
				margin-right: 20rpx;
				padding: 0 10rpx;
			}
		}
	}

	.order-details .wrapper .actualPay .money {
		font-weight: bold;
		font-size: 30rpx;
	}

	.order-details .footer {
		width: 100%;
		position: fixed;
		display: flex;
		justify-content: flex-end;
		bottom: 0;
		left: 0;
		background-color: #fff;
		padding: 20rpx 30rpx;
		padding-bottom: calc(20rpx + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
		padding-bottom: calc(20rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
		box-sizing: border-box;

		.last_money {
			font-size: 28rpx;
			color: #000;
		}

		.more {
			// position: absolute;
			left: 30rpx;
			font-size: 26rpx;
			color: #333;

			.icon-xiangshang {
				margin-left: 6rpx;
				font-size: 22rpx;
			}
		}

		.right-btn {
			display: flex;
		}

		.more-box {
			color: #333;
			position: absolute;
			left: 30rpx;
			background-color: #fff;
			padding: 18rpx 24rpx;
			border-radius: 4rpx;
			font-size: 28rpx;
			-webkit-box-shadow: 0px 0px 3px 0px rgba(200, 200, 200, 0.75);
			-moz-box-shadow: 0px 0px 3px 0px rgba(200, 200, 200, 0.75);
			box-shadow: 0px 0px 3px 0px rgba(200, 200, 200, 0.75);
			bottom: 110rpx;
			/* #ifdef APP-PLUS */
			bottom: calc(110rpx + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
			bottom: calc(110rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/

			/* #endif */
			.more-btn {
				color: #333;
				padding: 4rpx;
				z-index: 9999;
			}
		}

		.more-box:before {
			content: '';
			width: 0rpx;
			height: 0rpx;
			border-top: 20rpx solid rgba(200, 200, 200, 0.4);
			border-bottom: 0rpx solid transparent;
			border-top: 20rpx solid rgba(200, 200, 200, 0.4);
			border-left: 20rpx solid rgba(0, 0, 0, 0);
			border-right: 20rpx solid rgba(0, 0, 0, 0);
			position: absolute;
			bottom: -20rpx;
			left: 20rpx;
		}

		.more-box::after {
			content: '';
			width: 0rpx;
			height: 0rpx;
			border-top: 20rpx solid #fff;
			border-bottom: 0rpx solid rgba(0, 0, 0, 0);
			border-left: 20rpx solid rgba(0, 0, 0, 0);
			border-right: 20rpx solid rgba(0, 0, 0, 0);
			position: absolute;
			bottom: -18rpx;
			left: 20rpx;
			z-index: 9;
		}
	}

	.order-details .footer .bnt {
		width: 200rpx;
		height: 60rpx;
		text-align: center;
		line-height: 60rpx;
		border-radius: 50rpx;
		color: #fff;
		font-size: 27rpx;

		button {
			font-size: 27rpx;
			color: #fff;
			width: 160rpx;
			height: 60rpx;
			line-height: 60rpx;
			border-radius: 60rpx;
			background: var(--view-theme);
			text-align: center;
		}
	}

	.order-details .footer .bnt.refundBnt {
		width: 210rpx;
	}

	.order-details .footer .bnt.cancel {
		color: #666;
		border: 1rpx solid #ccc;
	}

	.order-details .footer .bnt~.bnt {
		margin-left: 18rpx;
	}

	.order-details .writeOff {
		background-color: #fff;
		margin-top: 13rpx;
		padding-bottom: 30rpx;
	}

	.order-details .writeOff .title {
		font-size: 30rpx;
		color: #282828;
		height: 87rpx;
		border-bottom: 1px solid #f0f0f0;
		padding: 0 30rpx;
		line-height: 87rpx;
	}

	.order-details .writeOff .grayBg {
		background-color: #f2f5f7;
		width: 590rpx;
		height: 384rpx;
		border-radius: 20rpx 20rpx 0 0;
		margin: 50rpx auto 0 auto;
		padding-top: 55rpx;
		position: relative;
	}

	.order-details .writeOff .grayBg .written {
		position: absolute;
		top: 0;
		right: 0;
		width: 60rpx;
		height: 60rpx;
	}

	.order-details .writeOff .grayBg .written image {
		width: 100%;
		height: 100%;
	}

	.order-details .writeOff .grayBg .pictrue {
		width: 290rpx;
		height: 290rpx;
		margin: 0 auto;
	}

	.order-details .writeOff .grayBg .pictrue image {
		width: 100%;
		height: 100%;
		display: block;
	}

	.order-details .writeOff .gear {
		width: 590rpx;
		height: 30rpx;
		margin: 0 auto;
	}

	.order-details .writeOff .gear image {
		width: 100%;
		height: 100%;
		display: block;
	}

	.order-details .writeOff .num {
		background-color: #f0c34c;
		width: 590rpx;
		height: 84rpx;
		color: #282828;
		font-size: 48rpx;
		margin: 0 auto;
		border-radius: 0 0 20rpx 20rpx;
		text-align: center;
		padding-top: 4rpx;
	}

	.order-details .writeOff .rules {
		margin: 46rpx 30rpx 0 30rpx;
		border-top: 1px solid #f0f0f0;
		padding-top: 10rpx;
	}

	.order-details .writeOff .rules .item {
		margin-top: 20rpx;
	}

	.order-details .writeOff .rules .item .rulesTitle {
		font-size: 28rpx;
		color: #282828;
	}

	.order-details .writeOff .rules .item .rulesTitle .iconfont {
		font-size: 30rpx;
		color: #333;
		margin-right: 8rpx;
		margin-top: 5rpx;
	}

	.order-details .writeOff .rules .item .info {
		font-size: 28rpx;
		color: #999;
		margin-top: 7rpx;
	}

	.order-details .writeOff .rules .item .info .time {
		margin-left: 20rpx;
	}

	.order-details .map {
		height: 86rpx;
		font-size: 30rpx;
		color: #282828;
		line-height: 86rpx;
		border-bottom: 1px solid #f0f0f0;
		margin-top: 13rpx;
		background-color: #fff;
		padding: 0 30rpx;
	}

	.order-details .map .place {
		font-size: 26rpx;
		// width: 176rpx;
		height: 50rpx;
		border-radius: 25rpx;
		line-height: 50rpx;
		text-align: center;
		padding: 0 10rpx;
	}

	.order-details .map .place .iconfont {
		font-size: 27rpx;
		height: 27rpx;
		line-height: 27rpx;
		margin: 2rpx 3rpx 0 0;
	}

	.order-details .address .name .iconfont {
		font-size: 34rpx;
		margin-left: 10rpx;
	}

	.refund {
		padding: 0 30rpx 30rpx;
		margin: 12rpx 0;
		background-color: #fff;

		.title {
			display: flex;
			align-items: center;
			font-size: 30rpx;
			color: #333;
			height: 86rpx;
			border-bottom: 1px solid #f5f5f5;

			image {
				width: 32rpx;
				height: 32rpx;
				margin-right: 10rpx;
			}
		}

		.con {
			padding-top: 25rpx;
			font-size: 28rpx;
			color: #868686;
		}
	}
</style>

<style scoped lang="scss">
	.invoice-mask {
		background-color: #999999;
		opacity: 1;
	}

	.more-mask {
		background-color: #fff;
		opacity: 0;
		left: 300rpx;
	}

	.goodCall {
		color: var(--view-theme);
		text-align: center;
		width: 100%;
		height: 86rpx;
		padding: 0 30rpx;
		border-bottom: 1rpx solid #eee;
		font-size: 30rpx;
		line-height: 86rpx;
		background: #fff;

		.icon-kefu {
			font-size: 36rpx;
			margin-right: 15rpx;
		}

		/* #ifdef MP */
		button {
			display: flex;
			align-items: center;
			justify-content: center;
			height: 86rpx;
			font-size: 30rpx;
			color: var(--view-theme);
		}

		/* #endif */
	}

	.order-details .header {
		padding: 0 30rpx;
		height: 150rpx;
	}

	.order-details .header.on {
		background-color: #666 !important;
	}

	.order-details .header .pictrue {
		width: 110rpx;
		height: 110rpx;
	}

	.order-details .header .pictrue image {
		width: 100%;
		height: 100%;
	}

	.order-details .header .data {
		color: rgba(255, 255, 255, 0.8);
		font-size: 26rpx;
		margin-left: 27rpx;
	}

	.order-details .header .data.on {
		margin-left: 0;
	}

	.order-details .header .data .state {
		font-size: 30rpx;
		font-weight: bold;
		color: #fff;
		margin-bottom: 7rpx;
	}

	.order-details .header .data .time {
		margin-left: 20rpx;
	}

	.order-details .nav {
		background-color: #fff;
		font-size: 26rpx;
		color: #282828;
		padding: 25rpx 0;
	}

	.order-details .nav .navCon {
		padding: 0 40rpx;
	}

	.order-details .nav .on {
		color: var(--view-theme);
	}

	.order-details .nav .progress {
		padding: 0 65rpx;
		margin-top: 10rpx;
	}

	.order-details .nav .progress .line {
		width: 100rpx;
		height: 2rpx;
		background-color: #939390;
	}

	.order-details .nav .progress .iconfont {
		font-size: 25rpx;
		color: #939390;
		margin-top: -2rpx;
	}

	.order-details .address {
		font-size: 26rpx;
		color: #868686;
		background-color: #fff;
		padding: 35rpx 30rpx;
	}

	.order-details .address .name {
		font-size: 30rpx;
		color: #282828;
		margin-bottom: 15rpx;
	}

	.order-details .address .name .phone {
		margin-left: 40rpx;
	}

	.order-details .line {
		width: 100%;
		height: 3rpx;
	}

	.order-details .line image {
		width: 100%;
		height: 100%;
		display: block;
	}

	.order-details .wrapper {
		background-color: #fff;
		margin-top: 12rpx;
		padding: 30rpx;

		.info_box {
			.top_box {
				color: #000;
				margin-bottom: 30rpx;

				.name {
					font-size: 34rpx;
					margin-right: 14rpx;
				}

				.phone {
					font-size: 26rpx;
				}
			}

			.address_box {
				color: #808080;
				font-size: 28rpx;
			}
		}
	}

	.order-details .wrapper .item {
		font-size: 28rpx;
		color: #282828;
	}

	.order-details .wrapper .item~.item {
		margin-top: 20rpx;
	}

	.order-details .wrapper .item .conter {
		color: #868686;
		// width: 380rpx;
		text-align: justify;
		flex: 1;
	}

	.order-details .wrapper .item .conter .upload {
		padding-bottom: 36rpx;
	}

	.order-details .wrapper .diy-from-title {
		white-space: nowrap;
		width: 5em;
	}

	.order-details .wrapper .item .conter .upload .pictrue {
		margin: 22rpx 23rpx 0 0;
		width: 156rpx;
		height: 156rpx;
		position: relative;
		font-size: 26rpx;
		color: #bbb;
	}

	.order-details .wrapper .item .conter .copy {
		font-size: 20rpx;
		color: #333;
		height: max-content;
		border-radius: 3rpx;
		border: 1rpx solid #666;
		padding: 3rpx 15rpx;
		margin-left: 24rpx;
	}

	.order-details .wrapper .actualPay {
		border-top: 1rpx solid #eee;
		margin-top: 30rpx;
		padding-top: 30rpx;
	}

	.order-details .wrapper .actualPay .money {
		font-weight: bold;
		font-size: 30rpx;
	}

	.order-details .footer .bnt {
		width: 160rpx;
		height: 60rpx;
		text-align: center;
		line-height: 60rpx;
		border-radius: 50rpx;
		color: #fff;
		font-size: 27rpx;
	}

	.order-details .footer .bnt~.bnt {
		margin-left: 18rpx;
	}

	.order-details .writeOff {
		background-color: #fff;
		margin-top: 13rpx;
		padding-bottom: 30rpx;
	}

	.order-details .writeOff .title {
		font-size: 30rpx;
		color: #282828;
		height: 87rpx;
		border-bottom: 1px solid #f0f0f0;
		padding: 0 30rpx;
		line-height: 87rpx;
	}

	.order-details .writeOff .grayBg {
		background-color: #f2f5f7;
		width: 590rpx;
		height: 384rpx;
		border-radius: 20rpx 20rpx 0 0;
		margin: 50rpx auto 0 auto;
		padding-top: 55rpx;
		position: relative;
	}

	.order-details .writeOff .grayBg .written {
		position: absolute;
		top: 0;
		right: 0;
		width: 60rpx;
		height: 60rpx;
	}

	.order-details .writeOff .grayBg .written image {
		width: 100%;
		height: 100%;
	}

	.order-details .writeOff .grayBg .pictrue {
		width: 290rpx;
		height: 290rpx;
		margin: 0 auto;
	}

	.order-details .writeOff .grayBg .pictrue image {
		width: 100%;
		height: 100%;
		display: block;
	}

	.order-details .writeOff .gear {
		width: 590rpx;
		height: 30rpx;
		margin: 0 auto;
	}

	.order-details .writeOff .gear image {
		width: 100%;
		height: 100%;
		display: block;
	}

	.order-details .writeOff .num {
		background-color: #f0c34c;
		width: 590rpx;
		height: 84rpx;
		color: #282828;
		font-size: 48rpx;
		margin: 0 auto;
		border-radius: 0 0 20rpx 20rpx;
		text-align: center;
		padding-top: 4rpx;
	}

	.order-details .writeOff .rules {
		margin: 46rpx 30rpx 0 30rpx;
		border-top: 1px solid #f0f0f0;
		padding-top: 10rpx;
	}

	.order-details .writeOff .rules .item {
		margin-top: 20rpx;
	}

	.order-details .writeOff .rules .item .rulesTitle {
		font-size: 28rpx;
		color: #282828;
	}

	.order-details .writeOff .rules .item .rulesTitle .iconfont {
		font-size: 30rpx;
		color: #333;
		margin-right: 8rpx;
		margin-top: 5rpx;
	}

	.order-details .writeOff .rules .item .info {
		font-size: 28rpx;
		color: #999;
		margin-top: 7rpx;
	}

	.order-details .writeOff .rules .item .info .time {
		margin-left: 20rpx;
	}

	.order-details .map {
		height: 86rpx;
		font-size: 30rpx;
		color: #282828;
		line-height: 86rpx;
		border-bottom: 1px solid #f0f0f0;
		margin-top: 13rpx;
		background-color: #fff;
		padding: 0 30rpx;
	}

	.order-details .map .place {
		font-size: 26rpx;
		// width: 176rpx;
		height: 50rpx;
		border-radius: 25rpx;
		line-height: 50rpx;
		text-align: center;
	}

	.order-details .map .place .iconfont {
		font-size: 27rpx;
		height: 27rpx;
		line-height: 27rpx;
		margin: 2rpx 3rpx 0 0;
	}

	.order-details .address .name .iconfont {
		font-size: 34rpx;
		margin-left: 10rpx;
	}

	.refund {
		padding: 0 30rpx 30rpx;
		margin: 12rpx 0;
		background-color: #fff;

		.title {
			display: flex;
			align-items: center;
			font-size: 30rpx;
			color: #333;
			height: 86rpx;
			border-bottom: 1px solid #f5f5f5;

			image {
				width: 32rpx;
				height: 32rpx;
				margin-right: 10rpx;
			}
		}

		.con {
			padding-top: 25rpx;
			font-size: 28rpx;
			color: #868686;
		}
	}

	.refund-msg {
		background-color: #fff;
		padding: 20rpx 40rpx;
		font-size: 28rpx;

		.refund-msg-user {
			font-weight: bold;
			margin-bottom: 10rpx;

			.copy-refund-msg {
				font-size: 10px;
				border-radius: 1px;
				border: 0.5px solid #666;
				padding: 1px 7px;
				margin-left: 12px;
			}

			.name {
				margin-right: 20rpx;
			}
		}

		.refund-address {
			color: #868686;
		}
	}

	.copy-text {
		width: max-content;
		font-size: 10px;
		border-radius: 1px;
		border: 0.5px solid #666;
		padding: 1px 7px;
		margin-left: auto;
	}

	.upload .pictrue {
		display: inline-block;
		margin: 22rpx 17rpx 20rpx 0;
		width: 156rpx;
		height: 156rpx;
		color: #bbb;
	}

	.upload .pictrue image {
		width: 100%;
		height: 100%;
	}
</style>